package com.cjm.one.webmanager.service.goods.impl;

import com.cjm.one.goods.client.GoodsUnitClient;
import com.cjm.one.model.goods.entity.GoodsUnit;
import com.cjm.one.webmanager.service.goods.GoodsUnitService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsUnitServiceImpl implements GoodsUnitService {
    @Resource
    private GoodsUnitClient goodsUnitClient;
    @Override
    public List<GoodsUnit> getAll() {
        return goodsUnitClient.list().getData();
    }

    @Override
    public Boolean add(GoodsUnit goodsUnit) {
        return goodsUnitClient.add(goodsUnit).getData();
    }

    @Override
    public Boolean delete(Long id) {
        return goodsUnitClient.delete(id).getData();
    }
}
